<?php

class Person{
    //利用魔术方法模拟方法重载
    public function __call($name, $arguments)
    {
        $sum = 0;
        foreach ($arguments as $v){
            $sum += $v;
        }
        return $sum;
    }
}

$p = new Person();
echo $p->call(10, 20);    //30
echo $p->call(10, 20, 30);//60
